from django.db import models
from sync.models import SFObject,SFField
from wizard.models.view import View 
from django.db.models import Q
from django.db import connection, transaction



class ViewField(models.Model):
    view=models.ForeignKey(View)
    field=models.ForeignKey(SFField)
    label=models.CharField(max_length=255)
    ui_group=models.CharField(max_length=255)
    perm_group=models.CharField(max_length=255)
    #Form related
    default=models.CharField(max_length=255)
    mandatory=models.BooleanField()
    invisible=models.BooleanField()
    in_schema=models.BooleanField(default=True)

    class Meta:
        db_table = 'wizard_view_field'
        app_label = 'wizard'
    @staticmethod
    def create_field(view,sf_field):
        pass
